<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/1/11
  Time: 16:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <script type="text/javascript" src="/js/jquery-2.0.3.min.js"></script>
    <meta charset="UTF-8">
    <meta name="Generator" content="EditPlus®">
    <meta name="Author" content="">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <title>Document</title>
    <style type="text/css" rel="stylesheet">
        .wrap{margin:0 auto;width:400px;}
    </style>

    <script type="text/javascript">
        function userLogin() {

            var name = $("#name").val();
            var password = $("#password").val();
            alert(name);

            $.post("/user/login.do", { name: name, password: password },
                function(data){
                    alert("Data Loaded: " + data);
                });
            
        }


    </script>


</head>
<body>
<div class="wrap">
    <h1>网站后台管理系统</h1>
    <fieldset>
        <form action="/example/html/form_action.asp" method="get">
            <p>用户名: <input type="text" name="name" id="name"/></p>
            <p>密&nbsp;&nbsp;码: <input type="text" name="password"  id="password"/></p>
            <button type="button" onclick="userLogin()">登录</button>&nbsp;&nbsp;&nbsp;<input type="button" onclick="window.location.href='/user/register.do'" value="注册" />
        </form>
    </fieldset>
</div>
</body>
</html>